import 'package:aio/aio.dart';
import 'package:flutter/material.dart';
import 'package:app/src/ui/route/works/public/items/ui_base.dart';
import 'package:app/src/ui/route/works/public/items/ui_card.dart';

import '../../../../../../generated/app_strings.dart';
import '../../../../../http/bean/wroks/contract_bean.dart';
import '../../../../app_ui.dart';

///外车运费审核：申请信息
class UiCarFreightRatesInfo {
  ///data 信息
  ///oldData 历史信息
  static Widget build(
      BuildContext context, ContractCopyInfo? data, ContractCopyInfo? oldData) {
    if (StringUtils.isEmpty(data)) {
      return AppUi.getEmptyView();
    }
    List<Widget> children = [];
    children.add(UiBase.title(
        context, AppStrings.of(context).ApplicationInfo)); //标题：申请信息
    children.add(UiBase.item(
        context,
        AppStrings.of(context).OnWorkTime3,
        data?.OnWorkTime,
        oldData?.OnWorkTime)); //开始日期
    children.add(UiBase.item(context, AppStrings.of(context).OffWorkTime4,
        data?.OffWorkTime, oldData?.OffWorkTime)); //结束日期
    children.add(UiBase.item(
        context,
        AppStrings.of(context).TheName2,
        data?.TheName,
        oldData?.TheName)); //司机姓名
    children.add(UiBase.item(context, AppStrings.of(context).BkAccountNum2,
        data?.BkAccountNum, oldData?.BkAccountNum)); //银行卡号
    children.add(UiBase.item(context, AppStrings.of(context).Amount9,
        data?.Amount, oldData?.Amount)); //上报金额
    var column = UiBase.column(context, children);
    var card = UiCard.build(context, column);
    return card;
  }
}
